]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
global: Automatically unshape the stage X window when we take a modal
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 18 May 2013 22:54:44 +0000 (18:54 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 8 Jul 2013 21:05:17 +0000 (17:05 -0400)
This prevents the "client" from having to do it, and removes one part
of the FULLSCREEN input mode.

https://bugzilla.gnome.org/show_bug.cgi?id=700735

js/ui/main.js
src/shell-global.c

index 0774b3aad20dc8f239126a44b2dd39e6e370a7d5..1bd61b794aa473bc0509bd1b4d505052e30248bb 100644 (file)
@@ -356,8 +356,6 @@ function pushModal(actor, params) {
         Meta.disable_unredirect_for_screen(global.screen);
     }
 
-    global.set_stage_input_mode(Shell.StageInputMode.FULLSCREEN);
-
     modalCount += 1;
     let actorDestroyId = actor.connect('destroy', function() {
         let index = _findModal(actor);
@@ -406,7 +404,6 @@ function popModal(actor, timestamp) {
     if (focusIndex < 0) {
         global.stage.set_key_focus(null);
         global.end_modal(timestamp);
-        global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
         keybindingMode = Shell.KeyBindingMode.NORMAL;
 
         throw new Error('incorrect pop');
@@ -454,7 +451,6 @@ function popModal(actor, timestamp) {
         return;
 
     global.end_modal(timestamp);
-    global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
     Meta.enable_unredirect_for_screen(global.screen);
     keybindingMode = Shell.KeyBindingMode.NORMAL;
 }
index c448a7abc58aa5379583976d5bac15f461e2fb5a..afc3d5318bc466899e1580a6c615efd2eda80da0 100644 (file)
@@ -611,7 +611,7 @@ sync_input_region (ShellGlobal *global)
 
   if (global->gtk_grab_active)
     meta_empty_stage_input_region (screen);
-  else if (global->input_mode == SHELL_STAGE_INPUT_MODE_FULLSCREEN || !global->input_region)
+  else if (global->input_mode == SHELL_STAGE_INPUT_MODE_FULLSCREEN || !global->input_region || global->has_modal)
     meta_set_stage_input_region (screen, None);
   else
     meta_set_stage_input_region (screen, global->input_region);
@@ -1050,6 +1050,7 @@ shell_global_begin_modal (ShellGlobal       *global,
     return FALSE;
 
   global->has_modal = meta_plugin_begin_modal (global->plugin, global->stage_xwindow, None, options, timestamp);
+  sync_input_region (global);
   return global->has_modal;
 }
 
@@ -1080,6 +1081,8 @@ shell_global_end_modal (ShellGlobal *global,
   else if (get_key_focused_actor (global) && meta_stage_is_focused (global->meta_screen))
     meta_screen_focus_default_window (global->meta_screen,
                                       get_current_time_maybe_roundtrip (global));
+
+  sync_input_region (global);
 }
 
 void